package cn.dslcode.security.config.security;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author dongsilin
 * @version 2018/4/11.
 */
@Data
@Component
@ConfigurationProperties(prefix = "application.security", ignoreInvalidFields = true, exceptionIfInvalid = false)
public class CustomSecurityConstant {

    private ParameterName parameterName;
    private Uri uri;
    private RememberMe rememberMe;


    @Data
    public static class ParameterName{
        private String username;
        private String password;
        private String captchaCode;
    }

    @Data
    public static class Uri{
        private String[] staticResource;
        private String[] permitAll;
        private String loginForm;
        private String logout;
        private String unauthorized;
    }

    @Data
    public static class RememberMe{
        private String parameterName;
        private String key;
        private String cookieName;
        private int timeSeconds;
    }


}
